import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';

import { Nav } from './Nav';
import { App1 } from './App1';
import { App2 } from './App2';
import { App3 } from './App3';
import { App4 } from './App4';
import { App5 } from './App5';
import { Todos } from './Todos';

export const App = () => {
  return (
    <Router>
      {/* <Switch> */}
      {/* 导航 */}
      <Route path={'/'} component={Nav} />
      {/* 业务组件 */}
      <Route path={'/app1'} component={App1} />
      <Route path={'/app2'} component={App2} />
      <Route path={'/app3'} component={App3} />
      <Route path={'/app4'} component={App4} />
      <Route path={'/app5/:id?'} component={App5} />
      <Route path={'/todos'} component={Todos} />
      {/* </Switch> */}
    </Router>
  );
};
